<!DOCTYPE html>
<html>
<head>
    <meta name="keywords" content="酷龙科技">
    <meta name="renderer" content="webkit">
    <meta name="force-rendering" content="webkit">
    <meta http-equiv="x-ua-compatible" content="IE=edge">
    <meta name="csrf-token" content="{{ csrf_token() }}">
    <meta charset="utf-8">
    <link rel="icon" href="/favicon.ico" mce_href="favicon.ico">
    <link rel="stylesheet" href="{{ asset('layui/css/layui.css') }}"/>
    <link rel="stylesheet" href="{{ asset('css/animate.css') }}"/>
    <link rel="stylesheet" href="{{ asset('css/main.css') }}"/>
    <script src="{{ asset('js/socket.io-1.4.5.js') }}"></script>
    {{--<script src="//{{ Request::getHost() }}:6001/socket.io/socket.io.js"></script>--}}
    <style>
        .name {
            margin-top: 15px;
            display: block;
            height: 25px;
        }

        .full-screen-qr-code #qr-code {
            max-width: 100%;
            max-height: 100%;
            height: auto;
        }

        .full-screen-qr-code {
            text-align: center;
            background: rgba(0, 0, 0, 0.2) !important;
        }
    </style>
    <title>{{ $lotto->title }} - 现场抽奖</title>
</head>
<body>
<div id="app" class="index-bg"
     @if($lotto->bg_image) style="background-image: url({{ asset($lotto->bg_image) }})" @endif
>
    <music src="{{ $lotto->bg_music }}"></music>
    <div class="container">
        <div class="layui-row header">
            <div class="layui-col-xs3">
                <img src="{{ asset('images/logo.png') }}"/>
            </div>
            <div class="layui-col-xs7">
                <marquee scrollamount="12" class="header-title">{{ $lotto->title }}</marquee>
            </div>
            <div class="layui-col-xs3 ma"><img id="qr-code" src="{{ $lotto->joinQrCode() }}"/></div>
        </div>
        <!--main-->
        <div class="main">
            <play :lotto="{{ json_encode($lotto) }}"
                  :players-data="{{ json_encode($players) }}"
            ></play>
        </div>
    </div>
</div>

<script src="{{ asset('js/app.js') }}"></script>
<script src="{{ asset('layui/layui.all.js') }}"></script>
<script>
    layui.use(['layer'], function () {
        var qrCode = $('#qr-code');
        qrCode.on('click', function () {
            layer.open({
                type: 1,
                title: false,
                closeBtn: 0,
                shade: 0.01,
                area: ['auto', '70%'],
                shadeClose: true,
                skin: 'full-screen-qr-code',
                content: qrCode
            });
        });
    });
</script>
</body>
</html>
